<?php

$this->pageTitle=Yii::app()->name . ' - Cópia de Plano de Aula';

$this->breadcrumbs=array(
		'Turmas'=>	array('/turma/admin'),
		$turma->nome => array('/turma/view', 'id'=>$turma->id),
		'Aula '.$model->numero => array('view', 'id'=>$model->id),
		'Copiar Registros',
);

?>

<h4 align="center">Copiar Registros de Outras Aulas</h4>
<?php
$form1 = $this->beginWidget('CActiveForm', array(
		'id' => 'create-form',
		'enableAjaxValidation' => false,
		'enableClientValidation' => true,
		'htmlOptions' => array('enctype' => 'multipart/form-data'),
));

$aulas = array();
$aulas = Aula::model()->findAllByAttributes(array('turma_id'=>$turma->id));
$aula_array = array();
foreach ($aulas as $aula) {
	if($aula->numero != $model->numero) {
		$aula_array[$aula->id] = "Aula ".$aula->numero ." (".$aula->data.")";
	}
}
?>
<br />
<br />
<br />
<div class="row" align="center">
	<span style="float: left; width: 280px;"> <?php echo 'Aula: '.$form1->dropDownList($newAula, 'numero', $aula_array, array('empty' => '')); ?>
	</span> <span style="float: left; width: 280px;"> <?php
	$this->widget('zii.widgets.jui.CJuiButton', array(
			'buttonType' => 'submit',
			'name' => 'btnSubmit',
			'value' => '1',
			'caption' => '  Salvar   ',
			'htmlOptions' => array('class' => 'ui-button-primary')
	));
	?>
	</span>
</div>
<?php $this->endWidget();?>
